<?php

    if ( ! function_exists('config_paging'))
    {
        function config_paging($total_rows, $base_url, $per_page = 10, $uri_segment = 4)
        {
            $config['base_url'] = $base_url;
            $config['total_rows'] = $total_rows;
            $config['per_page'] = $per_page; // xác định số record ở mỗi trang
            $config['uri_segment'] = $uri_segment; // xác định segment chứa page number
            ///
            $config['full_tag_open'] = '<div class="pagination mini"><ul>';
            $config['full_tag_close'] = ' </ul></div>';
            $config['cur_tag_open'] = '<li class="active"><a>';
            $config['cur_tag_close'] = '</a></li>';
            $config['num_tag_open'] = '<li>';
            $config['num_tag_close'] = '</li>';
            $config['first_tag_open'] = '<li class="first">';
            $config['first_tag_close'] = '</li>';
            $config['first_link'] = '<i class="icon-first-2"></i>';
            $config['prev_tag_open'] = '<li class="prev">';
            $config['prev_tag_close'] = '</li>';
            $config['prev_link'] = '<i class="icon-previous"></i>';
            $config['next_link'] = '<i class="icon-next"></i>';
            $config['next_tag_open'] = '<li class="next">';
            $config['next_tag_close'] = '</li>';
            $config['last_link'] = '<i class="icon-last-2"></i></li>';
            $config['last_tag_open'] = '<li class="last">';
            $config['last_tag_close'] = '</li>';

            return $config;
        }
    }
?>